package com.wkbb.sports.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.wkbb.common.handler.JsonUtil;
import com.wkbb.sports.dto.TrainStudentDetailDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * hlife_train_student
 * @author 惠普
 * @date 2021-03-22 18:05:14
 */
@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class HlifeTrainGroup implements Serializable {

    @ApiModelProperty(value = "训练ID")
    private Long trainId;
    @ApiModelProperty(value = "完成次数")
    private Integer totalCount;
    @ApiModelProperty(value = "标准成绩(平均耗时（毫秒）)")
    private Integer achievement;
    @ApiModelProperty(value = "平均时间(平均耗时（毫秒）)")
    private Long avgTime;
    @ApiModelProperty(value = "最快反应时间")
    private Long minTime;
    @ApiModelProperty(value = "最慢反应时间")
    private Long maxTime;
    @ApiModelProperty(value = "设备组别")
    private String groupName;
    @ApiModelProperty(value = "设备名称")
    private String deviceName;
    @ApiModelProperty(value = "设备跳绳详情")
    private String deviceDetails;
    @ApiModelProperty(value = "训练详情")
    private List<TrainStudentDetailDto> details;

    public void setDetails(List<TrainStudentDetailDto> details) {
        this.details = details;
    }
    public void setDetails(String details) {
        this.details = JsonUtil.jsonToList(details,TrainStudentDetailDto.class);
    }
}